import { ProTableInfo } from './types';

const PROTABLE_KEY = 'protable';

const storage = {
  /**
   * 存储ProTableInfo
   */
  saveProTableInfo(proTableInfo: ProTableInfo) {
    localStorage.setItem(PROTABLE_KEY, proTableInfo);
  },

  /**
   * 获取ProTableInfo
   */
  getProTableInfo() {
    return localStorage.getItem(PROTABLE_KEY);
  },

  /**
   * 删除ProTableInfo
   */
  removeProTableInfo() {
    localStorage.removeItem(PROTABLE_KEY);
  },
};

export default storage;
